﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Salon
{
    //Zmiana nazwy klasy z Salon na AutoSalon z powodu konfliktów z nazwą namespace'a
    public class AutoSalon
    {
        public int Id { get; set; }
        public String Name { get; set; }
        public String Country { get; set; }
        public String City { get; set; }
        public String Street { get; set; }
        public String Zip { get; set; }
        public String FlatNumber { get; set; }

        public override bool Equals(object obj)
        {
            AutoSalon sal = obj as AutoSalon;
            if (sal == null)
                return false;

            if (this.Id.Equals(sal.Id))
                return true;

            return false;
        }

        public override int GetHashCode()
        {
            return Id.GetHashCode();
        }
    }
}
